package com.wangeditor.test;

import java.math.BigInteger;

public class ColorUtils {

	public static  BigInteger rgb2Hex(int red,int green,int blue) {
		BigInteger srch = null;
		if((0<=red&&red<=255)&&(0<=green&&green<=255)&&(0<=blue&&blue<=255)){  
         String str1 = Integer.toHexString(red)+Integer.toHexString(green)+Integer.toHexString(blue);  
        // System.out.println(str1); 
          srch = new BigInteger(str1, 16);
        // System.out.println("16t10>>: "+srch.toString()); 
         //System.out.println("16t2>>: "+Integer.toBinaryString(Integer.parseInt(srch.toString()))); 
         
	    }
	    return srch;
	  }
  public static void main(String[] args) {
	rgb2Hex(240, 0, 0);
  }
}
